t1 = open('m1_sorted.txt')
t2 = open('m2_reverse.txt')
t3 = open('m3_shuffle.txt')
import time
def sortirov(a):

    spisok = [int(el.strip()) for el in f.readlines()]
    f.close()
    start = time.time()
    for i in range(len(spisok) - 1):
        for j in range(len(spisok) - 1 - i):
            if spisok[j] > spisok[j + 1]:
                spisok[j], spisok[j + 1] = spisok[j + 1], spisok[j]
        finish = time.time()
        t = round((finish - start) * 1000)
    print(a, t, 'millesecunds')
        
        
sortirov('m1_sorted.txt')
sortirov('m2_reverse.txt')
sortirov('m3_shuffle.txt')

                